package com.istock.union.controller;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

@Controller
@RequestMapping("pre")
public class TestFileController {

	private Logger logger = LoggerFactory.getLogger(getClass());
	@RequestMapping("testUpload")
	@ResponseBody
	public Map<String , Object> upload(MultipartFile file1, MultipartFile file2, String name,Integer age){
		Map<String , Object> result = new HashMap<String ,Object>();
		
		logger.info("name:{} , age:{} , file1:{} , file2:{}" , new Object[] {name , age , file1.getOriginalFilename() , file2.getOriginalFilename()});
		
		result.put("code", "S");
		return result;
	}
}
